<?php
namespace Mouta\UserBundle\Form\Type;

use Mouta\AmistateBundle\Entity\Usuario;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class MiUbicacionType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('pais','hidden')
            ->add('provincia','hidden')
            ->add('localidad','hidden')
            ->add('lat','hidden')
            ->add('lng','hidden')
            ->add('ubicacion','ubicacion', array(
                'label'  => 'Ubicación',
                'mapped' => false
            ))
        ;


    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Mouta\AmistateBundle\Entity\Usuario',
            'csrf_protection' => true,
            'csrf_field_name' => '_token',
        ));
    }

    public function getName()
    {
        return 'MiUbicacion';
    }


}